<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <input type="text" v-model="msg">
    {{ msg }}
    <hr>
    单选
    <label for="male">男</label>
    <input type="radio" value="男" v-model="gender" id="male">
    <label for="female">女</label>
    <input type="radio" value="女" v-model="gender" id="female">
    <br>
    {{ gender }}
    <hr>
    多选
    <label for="bst">篮球</label>
    <input type="checkbox" value="篮球" v-model="hobby" id="bst">
    <label for="ft">足球</label>
    <input type="checkbox" value="足球" v-model="hobby" id="ft">
    <label for="piqiu">皮球</label>
    <input type="checkbox" value="皮球" v-model="hobby" id="piqiu">

    {{ hobby }}

    <hr>
    复选框第二种用法，不需要定义value属性，直接和一个布尔值绑定即可（原理是将 复选框的 checked属性和 一个布尔值进行绑定）

    <input type="checkbox" v-model="isBeauty">
    {{
      isBeauty? '大美女': '好姑娘'
    }}
    <hr>
    <select multiple v-model="city" id="">
      <option value="合肥">合肥</option>
      <option value="六安">六安</option>
      <option value="芜湖">芜湖</option>
      <option value="蚌埠">蚌埠</option>
    </select>
    {{city}}
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        msg: '初始值',
        gender: '男',
        hobby: ['篮球','足球'],
        isBeauty: true,
        city: ['芜湖']
      }
    })
  </script>
</body>
</html>